//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension DataSync {
    // MARK: Enums

    public enum AgentStatus: String, CustomStringConvertible, Codable {
        case offline = "OFFLINE"
        case online = "ONLINE"
        public var description: String { return self.rawValue }
    }

    public enum Atime: String, CustomStringConvertible, Codable {
        case bestEffort = "BEST_EFFORT"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum EndpointType: String, CustomStringConvertible, Codable {
        case fips = "FIPS"
        case privateLink = "PRIVATE_LINK"
        case `public` = "PUBLIC"
        public var description: String { return self.rawValue }
    }

    public enum FilterType: String, CustomStringConvertible, Codable {
        case simplePattern = "SIMPLE_PATTERN"
        public var description: String { return self.rawValue }
    }

    public enum Gid: String, CustomStringConvertible, Codable {
        case both = "BOTH"
        case intValue = "INT_VALUE"
        case name = "NAME"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum LocationFilterName: String, CustomStringConvertible, Codable {
        case creationtime = "CreationTime"
        case locationtype = "LocationType"
        case locationuri = "LocationUri"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable {
        case basic = "BASIC"
        case off = "OFF"
        case transfer = "TRANSFER"
        public var description: String { return self.rawValue }
    }

    public enum Mtime: String, CustomStringConvertible, Codable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum NfsVersion: String, CustomStringConvertible, Codable {
        case automatic = "AUTOMATIC"
        case nfs3 = "NFS3"
        case nfs40 = "NFS4_0"
        case nfs41 = "NFS4_1"
        public var description: String { return self.rawValue }
    }

    public enum ObjectStorageServerProtocol: String, CustomStringConvertible, Codable {
        case http = "HTTP"
        case https = "HTTPS"
        public var description: String { return self.rawValue }
    }

    public enum `Operator`: String, CustomStringConvertible, Codable {
        case beginswith = "BeginsWith"
        case contains = "Contains"
        case equals = "Equals"
        case greaterthan = "GreaterThan"
        case greaterthanorequal = "GreaterThanOrEqual"
        case `in` = "In"
        case lessthan = "LessThan"
        case lessthanorequal = "LessThanOrEqual"
        case notcontains = "NotContains"
        case notequals = "NotEquals"
        public var description: String { return self.rawValue }
    }

    public enum OverwriteMode: String, CustomStringConvertible, Codable {
        case always = "ALWAYS"
        case never = "NEVER"
        public var description: String { return self.rawValue }
    }

    public enum PhaseStatus: String, CustomStringConvertible, Codable {
        case error = "ERROR"
        case pending = "PENDING"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum PosixPermissions: String, CustomStringConvertible, Codable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum PreserveDeletedFiles: String, CustomStringConvertible, Codable {
        case preserve = "PRESERVE"
        case remove = "REMOVE"
        public var description: String { return self.rawValue }
    }

    public enum PreserveDevices: String, CustomStringConvertible, Codable {
        case none = "NONE"
        case preserve = "PRESERVE"
        public var description: String { return self.rawValue }
    }

    public enum S3StorageClass: String, CustomStringConvertible, Codable {
        case deepArchive = "DEEP_ARCHIVE"
        case glacier = "GLACIER"
        case intelligentTiering = "INTELLIGENT_TIERING"
        case onezoneIa = "ONEZONE_IA"
        case outposts = "OUTPOSTS"
        case standard = "STANDARD"
        case standardIa = "STANDARD_IA"
        public var description: String { return self.rawValue }
    }

    public enum SmbVersion: String, CustomStringConvertible, Codable {
        case automatic = "AUTOMATIC"
        case smb2 = "SMB2"
        case smb3 = "SMB3"
        public var description: String { return self.rawValue }
    }

    public enum TaskExecutionStatus: String, CustomStringConvertible, Codable {
        case error = "ERROR"
        case launching = "LAUNCHING"
        case preparing = "PREPARING"
        case queued = "QUEUED"
        case success = "SUCCESS"
        case transferring = "TRANSFERRING"
        case verifying = "VERIFYING"
        public var description: String { return self.rawValue }
    }

    public enum TaskFilterName: String, CustomStringConvertible, Codable {
        case creationtime = "CreationTime"
        case locationid = "LocationId"
        public var description: String { return self.rawValue }
    }

    public enum TaskQueueing: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum TaskStatus: String, CustomStringConvertible, Codable {
        case available = "AVAILABLE"
        case creating = "CREATING"
        case queued = "QUEUED"
        case running = "RUNNING"
        case unavailable = "UNAVAILABLE"
        public var description: String { return self.rawValue }
    }

    public enum TransferMode: String, CustomStringConvertible, Codable {
        case all = "ALL"
        case changed = "CHANGED"
        public var description: String { return self.rawValue }
    }

    public enum Uid: String, CustomStringConvertible, Codable {
        case both = "BOTH"
        case intValue = "INT_VALUE"
        case name = "NAME"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum VerifyMode: String, CustomStringConvertible, Codable {
        case none = "NONE"
        case onlyFilesTransferred = "ONLY_FILES_TRANSFERRED"
        case pointInTimeConsistent = "POINT_IN_TIME_CONSISTENT"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AgentListEntry: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent.
        public let agentArn: String?
        /// The name of the agent.
        public let name: String?
        /// The status of the agent.
        public let status: AgentStatus?

        public init(agentArn: String? = nil, name: String? = nil, status: AgentStatus? = nil) {
            self.agentArn = agentArn
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct CancelTaskExecutionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task execution to cancel.
        public let taskExecutionArn: String

        public init(taskExecutionArn: String) {
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct CancelTaskExecutionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateAgentRequest: AWSEncodableShape {
        /// Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the AWS DataSync console. The redirect URL returned in the response provides you the activation key for your agent in the query string parameter activationKey. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent. For more information, see Activating an Agent in the AWS DataSync User Guide.
        public let activationKey: String
        /// The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.
        public let agentName: String?
        /// The ARNs of the security groups used to protect your data transfer task subnets. See CreateAgentRequest$SubnetArns.
        public let securityGroupArns: [String]?
        /// The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
        public let subnetArns: [String]?
        /// The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.  Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.
        public let tags: [TagListEntry]?
        /// The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see Creating a VPC Endpoint Service Configuration in the Amazon VPC User Guide. VPC endpoint ID looks like this: vpce-01234d5aff67890e1.
        public let vpcEndpointId: String?

        public init(activationKey: String, agentName: String? = nil, securityGroupArns: [String]? = nil, subnetArns: [String]? = nil, tags: [TagListEntry]? = nil, vpcEndpointId: String? = nil) {
            self.activationKey = activationKey
            self.agentName = agentName
            self.securityGroupArns = securityGroupArns
            self.subnetArns = subnetArns
            self.tags = tags
            self.vpcEndpointId = vpcEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.activationKey, name: "activationKey", parent: name, max: 29)
            try self.validate(self.activationKey, name: "activationKey", parent: name, pattern: "[A-Z0-9]{5}(-[A-Z0-9]{5}){4}")
            try self.validate(self.agentName, name: "agentName", parent: name, max: 256)
            try self.validate(self.agentName, name: "agentName", parent: name, min: 1)
            try self.validate(self.agentName, name: "agentName", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.securityGroupArns?.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 1)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.subnetArns?.forEach {
                try validate($0, name: "subnetArns[]", parent: name, max: 128)
                try validate($0, name: "subnetArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$")
            }
            try self.validate(self.subnetArns, name: "subnetArns", parent: name, max: 1)
            try self.validate(self.subnetArns, name: "subnetArns", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
            try self.validate(self.vpcEndpointId, name: "vpcEndpointId", parent: name, pattern: "^vpce-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case activationKey = "ActivationKey"
            case agentName = "AgentName"
            case securityGroupArns = "SecurityGroupArns"
            case subnetArns = "SubnetArns"
            case tags = "Tags"
            case vpcEndpointId = "VpcEndpointId"
        }
    }

    public struct CreateAgentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation to return a list of agents for your account and AWS Region.
        public let agentArn: String?

        public init(agentArn: String? = nil) {
            self.agentArn = agentArn
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct CreateLocationEfsRequest: AWSEncodableShape {
        /// The subnet and security group that the Amazon EFS file system uses. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified. The exact relationship between security group M (of the mount target) and security group S (which you provide for DataSync to use at this stage) is as follows:     Security group M (which you associate with the mount target) must allow inbound access for the Transmission Control Protocol (TCP) on the NFS port (2049) from security group S. You can enable inbound connections either by IP address (CIDR range) or security group.    Security group S (provided to DataSync to access EFS) should have a rule that enables outbound connections to the NFS port on one of the file system’s mount targets. You can enable outbound connections either by IP address (CIDR range) or security group. For information about security groups and mount targets, see Security Groups for Amazon EC2 Instances and Mount Targets in the Amazon EFS User Guide.
        public let ec2Config: Ec2Config
        /// The Amazon Resource Name (ARN) for the Amazon EFS file system.
        public let efsFilesystemArn: String
        /// A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.   Subdirectory must be specified with forward slashes. For example, /path/to/folder.
        public let subdirectory: String?
        /// The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
        public let tags: [TagListEntry]?

        public init(ec2Config: Ec2Config, efsFilesystemArn: String, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.ec2Config = ec2Config
            self.efsFilesystemArn = efsFilesystemArn
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.ec2Config.validate(name: "\(name).ec2Config")
            try self.validate(self.efsFilesystemArn, name: "efsFilesystemArn", parent: name, max: 128)
            try self.validate(self.efsFilesystemArn, name: "efsFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case ec2Config = "Ec2Config"
            case efsFilesystemArn = "EfsFilesystemArn"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationEfsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationFsxWindowsRequest: AWSEncodableShape {
        /// The name of the Windows domain that the FSx for Windows server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) for the FSx for Windows file system.
        public let fsxFilesystemArn: String
        /// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
        public let password: String
        /// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
        public let securityGroupArns: [String]
        /// A subdirectory in the location’s path. This subdirectory in the Amazon FSx for Windows file system is used to read data from the Amazon FSx for Windows source location or write data to the FSx for Windows destination.
        public let subdirectory: String?
        /// The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
        public let tags: [TagListEntry]?
        /// The user who has the permissions to access files and folders in the FSx for Windows file system.
        public let user: String

        public init(domain: String? = nil, fsxFilesystemArn: String, password: String, securityGroupArns: [String], subdirectory: String? = nil, tags: [TagListEntry]? = nil, user: String) {
            self.domain = domain
            self.fsxFilesystemArn = fsxFilesystemArn
            self.password = password
            self.securityGroupArns = securityGroupArns
            self.subdirectory = subdirectory
            self.tags = tags
            self.user = user
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^([A-Za-z0-9]+[A-Za-z0-9-.]*)*[A-Za-z0-9-]*[A-Za-z0-9]$")
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, max: 128)
            try self.validate(self.fsxFilesystemArn, name: "fsxFilesystemArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
            case fsxFilesystemArn = "FsxFilesystemArn"
            case password = "Password"
            case securityGroupArns = "SecurityGroupArns"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
            case user = "User"
        }
    }

    public struct CreateLocationFsxWindowsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for Windows file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationNfsRequest: AWSEncodableShape {
        /// The NFS mount options that DataSync can use to mount your NFS share.
        public let mountOptions: NfsMountOptions?
        /// Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.  If you are copying data to or from your AWS Snowcone device, see NFS Server on AWS Snowcone for more information.
        public let onPremConfig: OnPremConfig
        /// The name of the NFS server. This value is the IP address or Domain Name Service (DNS) name of the NFS server. An agent that is installed on-premises uses this host name to mount the NFS server in a network.  If you are copying data to or from your AWS Snowcone device, see NFS Server on AWS Snowcone for more information.  This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.
        public let serverHostname: String
        /// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network.  To see all the paths exported by your NFS server, run "showmount -e nfs-server-name" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.  To transfer all the data in the folder you specified, DataSync needs to have permissions to read all the data. To ensure this, either configure the NFS export with no_root_squash, or ensure that the permissions for all of the files that you want DataSync allow read access for all users. Doing either enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access. If you are copying data to or from your AWS Snowcone device, see NFS Server on AWS Snowcone for more information. For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
        public let subdirectory: String
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(mountOptions: NfsMountOptions? = nil, onPremConfig: OnPremConfig, serverHostname: String, subdirectory: String, tags: [TagListEntry]? = nil) {
            self.mountOptions = mountOptions
            self.onPremConfig = onPremConfig
            self.serverHostname = serverHostname
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.onPremConfig.validate(name: "\(name).onPremConfig")
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case mountOptions = "MountOptions"
            case onPremConfig = "OnPremConfig"
            case serverHostname = "ServerHostname"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationNfsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source NFS file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationObjectStorageRequest: AWSEncodableShape {
        /// Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
        public let accessKey: String?
        /// The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
        public let agentArns: [String]
        /// The bucket on the self-managed object storage server that is used to read data from.
        public let bucketName: String
        /// Optional. The secret key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
        public let secretKey: String?
        /// The name of the self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server. An agent uses this host name to mount the object storage server in a network.
        public let serverHostname: String
        /// The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS). You can specify a custom port if your self-managed object storage server requires one.
        public let serverPort: Int?
        /// The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.
        public let serverProtocol: ObjectStorageServerProtocol?
        /// The subdirectory in the self-managed object storage server that is used to read data from.
        public let subdirectory: String?
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(accessKey: String? = nil, agentArns: [String], bucketName: String, secretKey: String? = nil, serverHostname: String, serverPort: Int? = nil, serverProtocol: ObjectStorageServerProtocol? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.accessKey = accessKey
            self.agentArns = agentArns
            self.bucketName = bucketName
            self.secretKey = secretKey
            self.serverHostname = serverHostname
            self.serverPort = serverPort
            self.serverProtocol = serverProtocol
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.accessKey, name: "accessKey", parent: name, max: 200)
            try self.validate(self.accessKey, name: "accessKey", parent: name, min: 8)
            try self.validate(self.accessKey, name: "accessKey", parent: name, pattern: "^.+$")
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.validate(self.secretKey, name: "secretKey", parent: name, max: 200)
            try self.validate(self.secretKey, name: "secretKey", parent: name, min: 8)
            try self.validate(self.secretKey, name: "secretKey", parent: name, pattern: "^.+$")
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.serverPort, name: "serverPort", parent: name, max: 65536)
            try self.validate(self.serverPort, name: "serverPort", parent: name, min: 1)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case agentArns = "AgentArns"
            case bucketName = "BucketName"
            case secretKey = "SecretKey"
            case serverHostname = "ServerHostname"
            case serverPort = "ServerPort"
            case serverProtocol = "ServerProtocol"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationObjectStorageResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationS3Request: AWSEncodableShape {
        /// If you are using DataSync on an AWS Outpost, specify the Amazon Resource Names (ARNs) of the DataSync agents deployed on your Outpost. For more information about launching a DataSync agent on an AWS Outpost, see outposts-agent.
        public let agentArns: [String]?
        /// The ARN of the Amazon S3 bucket. If the bucket is on an AWS Outpost, this must be an access point ARN.
        public let s3BucketArn: String
        public let s3Config: S3Config
        /// The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For buckets in AWS Regions, the storage class defaults to Standard. For buckets on AWS Outposts, the storage class defaults to AWS S3 Outposts. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see using-storage-classes.
        public let s3StorageClass: S3StorageClass?
        /// A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination.
        public let subdirectory: String?
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?

        public init(agentArns: [String]? = nil, s3BucketArn: String, s3Config: S3Config, s3StorageClass: S3StorageClass? = nil, subdirectory: String? = nil, tags: [TagListEntry]? = nil) {
            self.agentArns = agentArns
            self.s3BucketArn = s3BucketArn
            self.s3Config = s3Config
            self.s3StorageClass = s3StorageClass
            self.subdirectory = subdirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.agentArns?.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, max: 156)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(s3|s3-outposts):[a-z\\-0-9]*:[0-9]*:.*$")
            try self.s3Config.validate(name: "\(name).s3Config")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\p{Zs}]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case s3BucketArn = "S3BucketArn"
            case s3Config = "S3Config"
            case s3StorageClass = "S3StorageClass"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
        }
    }

    public struct CreateLocationS3Response: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateLocationSmbRequest: AWSEncodableShape {
        /// The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
        public let agentArns: [String]
        /// The name of the Windows domain that the SMB server belongs to.
        public let domain: String?
        /// The mount options used by DataSync to access the SMB server.
        public let mountOptions: SmbMountOptions?
        /// The password of the user who can mount the share, has the permissions to access files and folders in the SMB share.
        public let password: String
        /// The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. An agent that is installed on-premises uses this hostname to mount the SMB server in a network.  This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.
        public let serverHostname: String
        /// The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.   Subdirectory must be specified with forward slashes. For example, /path/to/folder.  To transfer all the data in the folder you specified, DataSync needs to have permissions to mount the SMB share, as well as to access all the data in that share. To ensure this, either ensure that the user/password specified belongs to the user who can mount the share, and who has the appropriate permissions for all of the files and directories that you want DataSync to access, or use credentials of a member of the Backup Operators group to mount the share. Doing either enables the agent to access the data. For the agent to access directories, you must additionally enable all execute access.
        public let subdirectory: String
        /// The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
        public let tags: [TagListEntry]?
        /// The user who can mount the share, has the permissions to access files and folders in the SMB share.
        public let user: String

        public init(agentArns: [String], domain: String? = nil, mountOptions: SmbMountOptions? = nil, password: String, serverHostname: String, subdirectory: String, tags: [TagListEntry]? = nil, user: String) {
            self.agentArns = agentArns
            self.domain = domain
            self.mountOptions = mountOptions
            self.password = password
            self.serverHostname = serverHostname
            self.subdirectory = subdirectory
            self.tags = tags
            self.user = user
        }

        public func validate(name: String) throws {
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, max: 253)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^([A-Za-z0-9]+[A-Za-z0-9-.]*)*[A-Za-z0-9-]*[A-Za-z0-9]$")
            try self.validate(self.password, name: "password", parent: name, max: 104)
            try self.validate(self.password, name: "password", parent: name, pattern: "^.{0,104}$")
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, max: 255)
            try self.validate(self.serverHostname, name: "serverHostname", parent: name, pattern: "^(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])$")
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, max: 4096)
            try self.validate(self.subdirectory, name: "subdirectory", parent: name, pattern: "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
            try self.validate(self.user, name: "user", parent: name, max: 104)
            try self.validate(self.user, name: "user", parent: name, pattern: "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case domain = "Domain"
            case mountOptions = "MountOptions"
            case password = "Password"
            case serverHostname = "ServerHostname"
            case subdirectory = "Subdirectory"
            case tags = "Tags"
            case user = "User"
        }
    }

    public struct CreateLocationSmbResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source SMB file system location that is created.
        public let locationArn: String?

        public init(locationArn: String? = nil) {
            self.locationArn = locationArn
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct CreateTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
        public let cloudWatchLogGroupArn: String?
        /// The Amazon Resource Name (ARN) of an AWS storage resource's location.
        public let destinationLocationArn: String
        /// A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".
        public let excludes: [FilterRule]?
        /// The name of a task. This value is a text reference that is used to identify the task in the console.
        public let name: String?
        /// The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution. You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on. For each individual task execution, you can override these options by specifying the OverrideOptions before starting the task execution. For more information, see the operation.
        public let options: Options?
        /// Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see task-scheduling.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the source location for the task.
        public let sourceLocationArn: String
        /// The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string.
        public let tags: [TagListEntry]?

        public init(cloudWatchLogGroupArn: String? = nil, destinationLocationArn: String, excludes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, sourceLocationArn: String, tags: [TagListEntry]? = nil) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.destinationLocationArn = destinationLocationArn
            self.excludes = excludes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.sourceLocationArn = sourceLocationArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, max: 562)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$")
            try self.validate(self.destinationLocationArn, name: "destinationLocationArn", parent: name, max: 128)
            try self.validate(self.destinationLocationArn, name: "destinationLocationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.excludes?.forEach {
                try $0.validate(name: "\(name).excludes[]")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 1)
            try self.validate(self.excludes, name: "excludes", parent: name, min: 0)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.options?.validate(name: "\(name).options")
            try self.schedule?.validate(name: "\(name).schedule")
            try self.validate(self.sourceLocationArn, name: "sourceLocationArn", parent: name, max: 128)
            try self.validate(self.sourceLocationArn, name: "sourceLocationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case destinationLocationArn = "DestinationLocationArn"
            case excludes = "Excludes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case sourceLocationArn = "SourceLocationArn"
            case tags = "Tags"
        }
    }

    public struct CreateTaskResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the task.
        public let taskArn: String?

        public init(taskArn: String? = nil) {
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DeleteAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents operation to return a list of agents for your account and AWS Region.
        public let agentArn: String

        public init(agentArn: String) {
            self.agentArn = agentArn
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct DeleteAgentResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLocationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the location to delete.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DeleteLocationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task to delete.
        public let taskArn: String

        public init(taskArn: String) {
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DeleteTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to describe.
        public let agentArn: String

        public init(agentArn: String) {
            self.agentArn = agentArn
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
        }
    }

    public struct DescribeAgentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the agent.
        public let agentArn: String?
        /// The time that the agent was activated (that is, created in your account).
        public let creationTime: Date?
        /// The type of endpoint that your agent is connected to. If the endpoint is a VPC endpoint, the agent is not accessible over the public internet.
        public let endpointType: EndpointType?
        /// The time that the agent last connected to DataSyc.
        public let lastConnectionTime: Date?
        /// The name of the agent.
        public let name: String?
        /// The subnet and the security group that DataSync used to access a VPC endpoint.
        public let privateLinkConfig: PrivateLinkConfig?
        /// The status of the agent. If the status is ONLINE, then the agent is configured properly and is available to use. The Running status is the normal running status for an agent. If the status is OFFLINE, the agent's VM is turned off or the agent is in an unhealthy state. When the issue that caused the unhealthy state is resolved, the agent returns to ONLINE status.
        public let status: AgentStatus?

        public init(agentArn: String? = nil, creationTime: Date? = nil, endpointType: EndpointType? = nil, lastConnectionTime: Date? = nil, name: String? = nil, privateLinkConfig: PrivateLinkConfig? = nil, status: AgentStatus? = nil) {
            self.agentArn = agentArn
            self.creationTime = creationTime
            self.endpointType = endpointType
            self.lastConnectionTime = lastConnectionTime
            self.name = name
            self.privateLinkConfig = privateLinkConfig
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case creationTime = "CreationTime"
            case endpointType = "EndpointType"
            case lastConnectionTime = "LastConnectionTime"
            case name = "Name"
            case privateLinkConfig = "PrivateLinkConfig"
            case status = "Status"
        }
    }

    public struct DescribeLocationEfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the EFS location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationEfsResponse: AWSDecodableShape {
        /// The time that the EFS location was created.
        public let creationTime: Date?
        public let ec2Config: Ec2Config?
        /// The Amazon Resource Name (ARN) of the EFS location that was described.
        public let locationArn: String?
        /// The URL of the EFS location that was described.
        public let locationUri: String?

        public init(creationTime: Date? = nil, ec2Config: Ec2Config? = nil, locationArn: String? = nil, locationUri: String? = nil) {
            self.creationTime = creationTime
            self.ec2Config = ec2Config
            self.locationArn = locationArn
            self.locationUri = locationUri
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case ec2Config = "Ec2Config"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
        }
    }

    public struct DescribeLocationFsxWindowsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the FSx for Windows location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationFsxWindowsResponse: AWSDecodableShape {
        /// The time that the FSx for Windows location was created.
        public let creationTime: Date?
        /// The name of the Windows domain that the FSx for Windows server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) of the FSx for Windows location that was described.
        public let locationArn: String?
        /// The URL of the FSx for Windows location that was described.
        public let locationUri: String?
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Windows file system.
        public let securityGroupArns: [String]?
        /// The user who has the permissions to access files and folders in the FSx for Windows file system.
        public let user: String?

        public init(creationTime: Date? = nil, domain: String? = nil, locationArn: String? = nil, locationUri: String? = nil, securityGroupArns: [String]? = nil, user: String? = nil) {
            self.creationTime = creationTime
            self.domain = domain
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.securityGroupArns = securityGroupArns
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case domain = "Domain"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case securityGroupArns = "SecurityGroupArns"
            case user = "User"
        }
    }

    public struct DescribeLocationNfsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the NFS location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationNfsResponse: AWSDecodableShape {
        /// The time that the NFS location was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the NFS location that was described.
        public let locationArn: String?
        /// The URL of the source NFS location that was described.
        public let locationUri: String?
        /// The NFS mount options that DataSync used to mount your NFS share.
        public let mountOptions: NfsMountOptions?
        public let onPremConfig: OnPremConfig?

        public init(creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, mountOptions: NfsMountOptions? = nil, onPremConfig: OnPremConfig? = nil) {
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.mountOptions = mountOptions
            self.onPremConfig = onPremConfig
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case mountOptions = "MountOptions"
            case onPremConfig = "OnPremConfig"
        }
    }

    public struct DescribeLocationObjectStorageRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the self-managed object storage server location that was described.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationObjectStorageResponse: AWSDecodableShape {
        /// Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
        public let accessKey: String?
        /// The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
        public let agentArns: [String]?
        /// The time that the self-managed object storage server agent was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the self-managed object storage server location to describe.
        public let locationArn: String?
        /// The URL of the source self-managed object storage server location that was described.
        public let locationUri: String?
        /// The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS).
        public let serverPort: Int?
        /// The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.
        public let serverProtocol: ObjectStorageServerProtocol?

        public init(accessKey: String? = nil, agentArns: [String]? = nil, creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, serverPort: Int? = nil, serverProtocol: ObjectStorageServerProtocol? = nil) {
            self.accessKey = accessKey
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.serverPort = serverPort
            self.serverProtocol = serverProtocol
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case serverPort = "ServerPort"
            case serverProtocol = "ServerProtocol"
        }
    }

    public struct DescribeLocationS3Request: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationS3Response: AWSDecodableShape {
        /// If you are using DataSync on an AWS Outpost, the Amazon Resource Name (ARNs) of the EC2 agents deployed on your Outpost. For more information about launching a DataSync agent on an AWS Outpost, see outposts-agent.
        public let agentArns: [String]?
        /// The time that the Amazon S3 bucket location was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
        public let locationArn: String?
        /// The URL of the Amazon S3 location that was described.
        public let locationUri: String?
        public let s3Config: S3Config?
        /// The Amazon S3 storage class that you chose to store your files in when this location is used as a task destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see using-storage-classes.
        public let s3StorageClass: S3StorageClass?

        public init(agentArns: [String]? = nil, creationTime: Date? = nil, locationArn: String? = nil, locationUri: String? = nil, s3Config: S3Config? = nil, s3StorageClass: S3StorageClass? = nil) {
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.s3Config = s3Config
            self.s3StorageClass = s3StorageClass
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case s3Config = "S3Config"
            case s3StorageClass = "S3StorageClass"
        }
    }

    public struct DescribeLocationSmbRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the SMB location to describe.
        public let locationArn: String

        public init(locationArn: String) {
            self.locationArn = locationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.locationArn, name: "locationArn", parent: name, max: 128)
            try self.validate(self.locationArn, name: "locationArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
        }
    }

    public struct DescribeLocationSmbResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source SMB file system location that is created.
        public let agentArns: [String]?
        /// The time that the SMB location was created.
        public let creationTime: Date?
        /// The name of the Windows domain that the SMB server belongs to.
        public let domain: String?
        /// The Amazon Resource Name (ARN) of the SMB location that was described.
        public let locationArn: String?
        /// The URL of the source SBM location that was described.
        public let locationUri: String?
        /// The mount options that are available for DataSync to use to access an SMB location.
        public let mountOptions: SmbMountOptions?
        /// The user who can mount the share, has the permissions to access files and folders in the SMB share.
        public let user: String?

        public init(agentArns: [String]? = nil, creationTime: Date? = nil, domain: String? = nil, locationArn: String? = nil, locationUri: String? = nil, mountOptions: SmbMountOptions? = nil, user: String? = nil) {
            self.agentArns = agentArns
            self.creationTime = creationTime
            self.domain = domain
            self.locationArn = locationArn
            self.locationUri = locationUri
            self.mountOptions = mountOptions
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
            case creationTime = "CreationTime"
            case domain = "Domain"
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
            case mountOptions = "MountOptions"
            case user = "User"
        }
    }

    public struct DescribeTaskExecutionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task that is being executed.
        public let taskExecutionArn: String

        public init(taskExecutionArn: String) {
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct DescribeTaskExecutionResponse: AWSDecodableShape {
        /// The physical number of bytes transferred over the network.
        public let bytesTransferred: Int64?
        /// The number of logical bytes written to the destination AWS storage resource.
        public let bytesWritten: Int64?
        /// The estimated physical number of bytes that is to be transferred over the network.
        public let estimatedBytesToTransfer: Int64?
        /// The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING phase, before the TRANSFERRING phase. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.
        public let estimatedFilesToTransfer: Int64?
        /// A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: "/folder1|/folder2"
        public let excludes: [FilterRule]?
        /// The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING phase. It's updated periodically when each file is read from the source and sent over the network.  If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. This value can also be greater than EstimatedFilesTransferred in some cases. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.
        public let filesTransferred: Int64?
        /// A list of filter rules that determines which files to include when running a task. The list should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example: "/folder1|/folder2"
        public let includes: [FilterRule]?
        public let options: Options?
        /// The result of the task execution.
        public let result: TaskExecutionResultDetail?
        /// The time that the task execution was started.
        public let startTime: Date?
        /// The status of the task execution.  For detailed information about task execution statuses, see Understanding Task Statuses in the AWS DataSync User Guide.
        public let status: TaskExecutionStatus?
        /// The Amazon Resource Name (ARN) of the task execution that was described. TaskExecutionArn is hierarchical and includes TaskArn for the task that was executed.  For example, a TaskExecution value with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b executed the task with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2.
        public let taskExecutionArn: String?

        public init(bytesTransferred: Int64? = nil, bytesWritten: Int64? = nil, estimatedBytesToTransfer: Int64? = nil, estimatedFilesToTransfer: Int64? = nil, excludes: [FilterRule]? = nil, filesTransferred: Int64? = nil, includes: [FilterRule]? = nil, options: Options? = nil, result: TaskExecutionResultDetail? = nil, startTime: Date? = nil, status: TaskExecutionStatus? = nil, taskExecutionArn: String? = nil) {
            self.bytesTransferred = bytesTransferred
            self.bytesWritten = bytesWritten
            self.estimatedBytesToTransfer = estimatedBytesToTransfer
            self.estimatedFilesToTransfer = estimatedFilesToTransfer
            self.excludes = excludes
            self.filesTransferred = filesTransferred
            self.includes = includes
            self.options = options
            self.result = result
            self.startTime = startTime
            self.status = status
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case bytesTransferred = "BytesTransferred"
            case bytesWritten = "BytesWritten"
            case estimatedBytesToTransfer = "EstimatedBytesToTransfer"
            case estimatedFilesToTransfer = "EstimatedFilesToTransfer"
            case excludes = "Excludes"
            case filesTransferred = "FilesTransferred"
            case includes = "Includes"
            case options = "Options"
            case result = "Result"
            case startTime = "StartTime"
            case status = "Status"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct DescribeTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the task to describe.
        public let taskArn: String

        public init(taskArn: String) {
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taskArn = "TaskArn"
        }
    }

    public struct DescribeTaskResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task. For more information on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide.
        public let cloudWatchLogGroupArn: String?
        /// The time that the task was created.
        public let creationTime: Date?
        /// The Amazon Resource Name (ARN) of the task execution that is syncing files.
        public let currentTaskExecutionArn: String?
        /// The Amazon Resource Name (ARN) of the AWS storage resource's location.
        public let destinationLocationArn: String?
        /// The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network Interface) that was created for your subnet.
        public let destinationNetworkInterfaceArns: [String]?
        /// Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
        public let errorCode: String?
        /// Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
        public let errorDetail: String?
        /// A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: "/folder1|/folder2"
        public let excludes: [FilterRule]?
        /// The name of the task that was described.
        public let name: String?
        /// The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution. You can configure these options to preserve metadata such as user ID (UID) and group (GID), file permissions, data integrity verification, and so on. For each individual task execution, you can override these options by specifying the overriding OverrideOptions value to operation.
        public let options: Options?
        /// The schedule used to periodically transfer files from a source to a destination location.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the source file system's location.
        public let sourceLocationArn: String?
        /// The Amazon Resource Name (ARN) of the source ENIs (Elastic Network Interface) that was created for your subnet.
        public let sourceNetworkInterfaceArns: [String]?
        /// The status of the task that was described. For detailed information about task execution statuses, see Understanding Task Statuses in the AWS DataSync User Guide.
        public let status: TaskStatus?
        /// The Amazon Resource Name (ARN) of the task that was described.
        public let taskArn: String?

        public init(cloudWatchLogGroupArn: String? = nil, creationTime: Date? = nil, currentTaskExecutionArn: String? = nil, destinationLocationArn: String? = nil, destinationNetworkInterfaceArns: [String]? = nil, errorCode: String? = nil, errorDetail: String? = nil, excludes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, sourceLocationArn: String? = nil, sourceNetworkInterfaceArns: [String]? = nil, status: TaskStatus? = nil, taskArn: String? = nil) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.creationTime = creationTime
            self.currentTaskExecutionArn = currentTaskExecutionArn
            self.destinationLocationArn = destinationLocationArn
            self.destinationNetworkInterfaceArns = destinationNetworkInterfaceArns
            self.errorCode = errorCode
            self.errorDetail = errorDetail
            self.excludes = excludes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.sourceLocationArn = sourceLocationArn
            self.sourceNetworkInterfaceArns = sourceNetworkInterfaceArns
            self.status = status
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case creationTime = "CreationTime"
            case currentTaskExecutionArn = "CurrentTaskExecutionArn"
            case destinationLocationArn = "DestinationLocationArn"
            case destinationNetworkInterfaceArns = "DestinationNetworkInterfaceArns"
            case errorCode = "ErrorCode"
            case errorDetail = "ErrorDetail"
            case excludes = "Excludes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case sourceLocationArn = "SourceLocationArn"
            case sourceNetworkInterfaceArns = "SourceNetworkInterfaceArns"
            case status = "Status"
            case taskArn = "TaskArn"
        }
    }

    public struct Ec2Config: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.
        public let securityGroupArns: [String]
        /// The ARN of the subnet and the security group that DataSync uses to access the target EFS file system.
        public let subnetArn: String

        public init(securityGroupArns: [String], subnetArn: String) {
            self.securityGroupArns = securityGroupArns
            self.subnetArn = subnetArn
        }

        public func validate(name: String) throws {
            try self.securityGroupArns.forEach {
                try validate($0, name: "securityGroupArns[]", parent: name, max: 128)
                try validate($0, name: "securityGroupArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$")
            }
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, max: 5)
            try self.validate(self.securityGroupArns, name: "securityGroupArns", parent: name, min: 1)
            try self.validate(self.subnetArn, name: "subnetArn", parent: name, max: 128)
            try self.validate(self.subnetArn, name: "subnetArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupArns = "SecurityGroupArns"
            case subnetArn = "SubnetArn"
        }
    }

    public struct FilterRule: AWSEncodableShape & AWSDecodableShape {
        /// The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.
        public let filterType: FilterType?
        /// A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
        public let value: String?

        public init(filterType: FilterType? = nil, value: String? = nil) {
            self.filterType = filterType
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 409_600)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[^\\x00]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case filterType = "FilterType"
            case value = "Value"
        }
    }

    public struct ListAgentsRequest: AWSEncodableShape {
        /// The maximum number of agents to list.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of agents.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[a-zA-Z0-9=_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAgentsResponse: AWSDecodableShape {
        /// A list of agents in your account.
        public let agents: [AgentListEntry]?
        /// An opaque string that indicates the position at which to begin returning the next list of agents.
        public let nextToken: String?

        public init(agents: [AgentListEntry]? = nil, nextToken: String? = nil) {
            self.agents = agents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case agents = "Agents"
            case nextToken = "NextToken"
        }
    }

    public struct ListLocationsRequest: AWSEncodableShape {
        /// You can use API filters to narrow down the list of resources returned by ListLocations. For example, to retrieve all tasks on a specific source location, you can use ListLocations with filter name LocationType S3 and Operator Equals.
        public let filters: [LocationFilter]?
        /// The maximum number of locations to return.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of locations.
        public let nextToken: String?

        public init(filters: [LocationFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[a-zA-Z0-9=_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLocationsResponse: AWSDecodableShape {
        /// An array that contains a list of locations.
        public let locations: [LocationListEntry]?
        /// An opaque string that indicates the position at which to begin returning the next list of locations.
        public let nextToken: String?

        public init(locations: [LocationListEntry]? = nil, nextToken: String? = nil) {
            self.locations = locations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case locations = "Locations"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The maximum number of locations to return.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of locations.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource whose tags to list.
        public let resourceArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[a-zA-Z0-9=_-]+")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// An opaque string that indicates the position at which to begin returning the next list of resource tags.
        public let nextToken: String?
        /// Array of resource tags.
        public let tags: [TagListEntry]?

        public init(nextToken: String? = nil, tags: [TagListEntry]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct ListTaskExecutionsRequest: AWSEncodableShape {
        /// The maximum number of executed tasks to list.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of the executed tasks.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the task whose tasks you want to list.
        public let taskArn: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, taskArn: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[a-zA-Z0-9=_-]+")
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case taskArn = "TaskArn"
        }
    }

    public struct ListTaskExecutionsResponse: AWSDecodableShape {
        /// An opaque string that indicates the position at which to begin returning the next list of executed tasks.
        public let nextToken: String?
        /// A list of executed tasks.
        public let taskExecutions: [TaskExecutionListEntry]?

        public init(nextToken: String? = nil, taskExecutions: [TaskExecutionListEntry]? = nil) {
            self.nextToken = nextToken
            self.taskExecutions = taskExecutions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case taskExecutions = "TaskExecutions"
        }
    }

    public struct ListTasksRequest: AWSEncodableShape {
        /// You can use API filters to narrow down the list of resources returned by ListTasks. For example, to retrieve all tasks on a specific source location, you can use ListTasks with filter name LocationId and Operator Equals with the ARN for the location.
        public let filters: [TaskFilter]?
        /// The maximum number of tasks to return.
        public let maxResults: Int?
        /// An opaque string that indicates the position at which to begin the next list of tasks.
        public let nextToken: String?

        public init(filters: [TaskFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[a-zA-Z0-9=_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTasksResponse: AWSDecodableShape {
        /// An opaque string that indicates the position at which to begin returning the next list of tasks.
        public let nextToken: String?
        /// A list of all the tasks that are returned.
        public let tasks: [TaskListEntry]?

        public init(nextToken: String? = nil, tasks: [TaskListEntry]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tasks = "Tasks"
        }
    }

    public struct LocationFilter: AWSEncodableShape {
        /// The name of the filter being used. Each API call supports a list of filters that are available for it (for example, LocationType for ListLocations).
        public let name: LocationFilterName
        /// The operator that is used to compare filter values (for example, Equals or Contains). For more about API filtering operators, see query-resources.
        public let `operator`: Operator
        /// The values that you want to filter for. For example, you might want to display only Amazon S3 locations.
        public let values: [String]

        public init(name: LocationFilterName, operator: Operator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_\\ \\-\\:\\*\\.\\\\/\\?-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case `operator` = "Operator"
            case values = "Values"
        }
    }

    public struct LocationListEntry: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.
        public let locationArn: String?
        /// Represents a list of URLs of a location. LocationUri returns an array that contains a list of locations when the ListLocations operation is called. Format: TYPE://GLOBAL_ID/SUBDIR. TYPE designates the type of location. Valid values: NFS | EFS | S3. GLOBAL_ID is the globally unique identifier of the resource that backs the location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4 address or a host name compliant with Domain Name Service (DNS). SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it's the export path to mount the location. For Amazon S3, it's the prefix path that you mount to and treat as the root of the location.
        public let locationUri: String?

        public init(locationArn: String? = nil, locationUri: String? = nil) {
            self.locationArn = locationArn
            self.locationUri = locationUri
        }

        private enum CodingKeys: String, CodingKey {
            case locationArn = "LocationArn"
            case locationUri = "LocationUri"
        }
    }

    public struct NfsMountOptions: AWSEncodableShape & AWSDecodableShape {
        /// The specific NFS version that you want DataSync to use to mount your NFS share. If the server refuses to use the version specified, the sync will fail. If you don't specify a version, DataSync defaults to AUTOMATIC. That is, DataSync automatically selects a version based on negotiation with the NFS server. You can specify the following NFS versions:     NFSv3  - stateless protocol version that allows for asynchronous writes on the server.     NFSv4.0  - stateful, firewall-friendly protocol version that supports delegations and pseudo filesystems.     NFSv4.1  - stateful protocol version that supports sessions, directory delegations, and parallel data processing. Version 4.1 also includes all features available in version 4.0.
        public let version: NfsVersion?

        public init(version: NfsVersion? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "Version"
        }
    }

    public struct OnPremConfig: AWSEncodableShape & AWSDecodableShape {
        /// ARNs of the agents to use for an NFS location.
        public let agentArns: [String]

        public init(agentArns: [String]) {
            self.agentArns = agentArns
        }

        public func validate(name: String) throws {
            try self.agentArns.forEach {
                try validate($0, name: "agentArns[]", parent: name, max: 128)
                try validate($0, name: "agentArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            }
            try self.validate(self.agentArns, name: "agentArns", parent: name, max: 4)
            try self.validate(self.agentArns, name: "agentArns", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case agentArns = "AgentArns"
        }
    }

    public struct Options: AWSEncodableShape & AWSDecodableShape {
        /// A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set Atime to BEST_EFFORT, DataSync attempts to preserve the original Atime attribute on all source files (that is, the version before the PREPARING phase). However, Atime's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.  Default value: BEST_EFFORT. BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended). NONE: Ignore Atime.  If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE.  If Atime is set to NONE, Mtime must also be NONE.
        public let atime: Atime?
        /// A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024).
        public let bytesPerSecond: Int64?
        /// The group ID (GID) of the file's owners.  Default value: INT_VALUE. This preserves the integer value of the ID. INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended). NONE: Ignore UID and GID.
        public let gid: Gid?
        /// A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to OFF, no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.
        public let logLevel: LogLevel?
        /// A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.  Default value: PRESERVE.  PRESERVE: Preserve original Mtime (recommended)  NONE: Ignore Mtime.   If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. If Mtime is set to NONE, Atime must also be set to NONE.
        public let mtime: Mtime?
        /// A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.  Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see using-storage-classes in the AWS DataSync User Guide.
        public let overwriteMode: OverwriteMode?
        /// A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.  Default value: PRESERVE. PRESERVE: Preserve POSIX-style permissions (recommended). NONE: Ignore permissions.   AWS DataSync can preserve extant permissions of a source location.
        public let posixPermissions: PosixPermissions?
        /// A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see using-storage-classes in the AWS DataSync User Guide. Default value: PRESERVE. PRESERVE: Ignore such destination files (recommended).  REMOVE: Delete destination files that aren’t present in the source.
        public let preserveDeletedFiles: PreserveDeletedFiles?
        /// A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.  AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.  Default value: NONE. NONE: Ignore special devices (recommended).  PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
        public let preserveDevices: PreserveDevices?
        /// A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED, the tasks will be queued. The default is ENABLED. If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see queue-task-execution.
        public let taskQueueing: TaskQueueing?
        /// A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.  CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location. ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
        public let transferMode: TransferMode?
        /// The user ID (UID) of the file's owner.  Default value: INT_VALUE. This preserves the integer value of the ID. INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended). NONE: Ignore UID and GID.
        public let uid: Uid?
        /// A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see create-task  Default value: POINT_IN_TIME_CONSISTENT. ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.  POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes. NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
        public let verifyMode: VerifyMode?

        public init(atime: Atime? = nil, bytesPerSecond: Int64? = nil, gid: Gid? = nil, logLevel: LogLevel? = nil, mtime: Mtime? = nil, overwriteMode: OverwriteMode? = nil, posixPermissions: PosixPermissions? = nil, preserveDeletedFiles: PreserveDeletedFiles? = nil, preserveDevices: PreserveDevices? = nil, taskQueueing: TaskQueueing? = nil, transferMode: TransferMode? = nil, uid: Uid? = nil, verifyMode: VerifyMode? = nil) {
            self.atime = atime
            self.bytesPerSecond = bytesPerSecond
            self.gid = gid
            self.logLevel = logLevel
            self.mtime = mtime
            self.overwriteMode = overwriteMode
            self.posixPermissions = posixPermissions
            self.preserveDeletedFiles = preserveDeletedFiles
            self.preserveDevices = preserveDevices
            self.taskQueueing = taskQueueing
            self.transferMode = transferMode
            self.uid = uid
            self.verifyMode = verifyMode
        }

        public func validate(name: String) throws {
            try self.validate(self.bytesPerSecond, name: "bytesPerSecond", parent: name, min: -1)
        }

        private enum CodingKeys: String, CodingKey {
            case atime = "Atime"
            case bytesPerSecond = "BytesPerSecond"
            case gid = "Gid"
            case logLevel = "LogLevel"
            case mtime = "Mtime"
            case overwriteMode = "OverwriteMode"
            case posixPermissions = "PosixPermissions"
            case preserveDeletedFiles = "PreserveDeletedFiles"
            case preserveDevices = "PreserveDevices"
            case taskQueueing = "TaskQueueing"
            case transferMode = "TransferMode"
            case uid = "Uid"
            case verifyMode = "VerifyMode"
        }
    }

    public struct PrivateLinkConfig: AWSDecodableShape {
        /// The private endpoint that is configured for an agent that has access to IP addresses in a PrivateLink. An agent that is configured with this endpoint will not be accessible over the public internet.
        public let privateLinkEndpoint: String?
        /// The Amazon Resource Names (ARNs) of the security groups that are configured for the EC2 resource that hosts an agent activated in a VPC or an agent that has access to a VPC endpoint.
        public let securityGroupArns: [String]?
        /// The Amazon Resource Names (ARNs) of the subnets that are configured for an agent activated in a VPC or an agent that has access to a VPC endpoint.
        public let subnetArns: [String]?
        /// The ID of the VPC endpoint that is configured for an agent. An agent that is configured with a VPC endpoint will not be accessible over the public internet.
        public let vpcEndpointId: String?

        public init(privateLinkEndpoint: String? = nil, securityGroupArns: [String]? = nil, subnetArns: [String]? = nil, vpcEndpointId: String? = nil) {
            self.privateLinkEndpoint = privateLinkEndpoint
            self.securityGroupArns = securityGroupArns
            self.subnetArns = subnetArns
            self.vpcEndpointId = vpcEndpointId
        }

        private enum CodingKeys: String, CodingKey {
            case privateLinkEndpoint = "PrivateLinkEndpoint"
            case securityGroupArns = "SecurityGroupArns"
            case subnetArns = "SubnetArns"
            case vpcEndpointId = "VpcEndpointId"
        }
    }

    public struct S3Config: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 bucket to access. This bucket is used as a parameter in the CreateLocationS3 operation.
        public let bucketAccessRoleArn: String

        public init(bucketAccessRoleArn: String) {
            self.bucketAccessRoleArn = bucketAccessRoleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketAccessRoleArn, name: "bucketAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.bucketAccessRoleArn, name: "bucketAccessRoleArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketAccessRoleArn = "BucketAccessRoleArn"
        }
    }

    public struct SmbMountOptions: AWSEncodableShape & AWSDecodableShape {
        /// The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to AUTOMATIC. That is, DataSync automatically selects a version based on negotiation with the SMB server.
        public let version: SmbVersion?

        public init(version: SmbVersion? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "Version"
        }
    }

    public struct StartTaskExecutionRequest: AWSEncodableShape {
        /// A list of filter rules that determines which files to include when running a task. The pattern should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe). For example: "/folder1|/folder2"
        public let includes: [FilterRule]?
        public let overrideOptions: Options?
        /// The Amazon Resource Name (ARN) of the task to start.
        public let taskArn: String

        public init(includes: [FilterRule]? = nil, overrideOptions: Options? = nil, taskArn: String) {
            self.includes = includes
            self.overrideOptions = overrideOptions
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.includes?.forEach {
                try $0.validate(name: "\(name).includes[]")
            }
            try self.validate(self.includes, name: "includes", parent: name, max: 1)
            try self.validate(self.includes, name: "includes", parent: name, min: 0)
            try self.overrideOptions?.validate(name: "\(name).overrideOptions")
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case includes = "Includes"
            case overrideOptions = "OverrideOptions"
            case taskArn = "TaskArn"
        }
    }

    public struct StartTaskExecutionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the specific task execution that was started.
        public let taskExecutionArn: String?

        public init(taskExecutionArn: String? = nil) {
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct TagListEntry: AWSEncodableShape & AWSDecodableShape {
        /// The key for an AWS resource tag.
        public let key: String
        /// The value for an AWS resource tag.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:/-]+$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to apply the tag to.
        public let resourceArn: String
        /// The tags to apply.
        public let tags: [TagListEntry]

        public init(resourceArn: String, tags: [TagListEntry]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[0-9a-z]{17}$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TaskExecutionListEntry: AWSDecodableShape {
        /// The status of a task execution.
        public let status: TaskExecutionStatus?
        /// The Amazon Resource Name (ARN) of the task that was executed.
        public let taskExecutionArn: String?

        public init(status: TaskExecutionStatus? = nil, taskExecutionArn: String? = nil) {
            self.status = status
            self.taskExecutionArn = taskExecutionArn
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct TaskExecutionResultDetail: AWSDecodableShape {
        /// Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
        public let errorCode: String?
        /// Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
        public let errorDetail: String?
        /// The total time in milliseconds that AWS DataSync spent in the PREPARING phase.
        public let prepareDuration: Int64?
        /// The status of the PREPARING phase.
        public let prepareStatus: PhaseStatus?
        /// The total time in milliseconds that AWS DataSync took to transfer the file from the source to the destination location.
        public let totalDuration: Int64?
        /// The total time in milliseconds that AWS DataSync spent in the TRANSFERRING phase.
        public let transferDuration: Int64?
        /// The status of the TRANSFERRING phase.
        public let transferStatus: PhaseStatus?
        /// The total time in milliseconds that AWS DataSync spent in the VERIFYING phase.
        public let verifyDuration: Int64?
        /// The status of the VERIFYING phase.
        public let verifyStatus: PhaseStatus?

        public init(errorCode: String? = nil, errorDetail: String? = nil, prepareDuration: Int64? = nil, prepareStatus: PhaseStatus? = nil, totalDuration: Int64? = nil, transferDuration: Int64? = nil, transferStatus: PhaseStatus? = nil, verifyDuration: Int64? = nil, verifyStatus: PhaseStatus? = nil) {
            self.errorCode = errorCode
            self.errorDetail = errorDetail
            self.prepareDuration = prepareDuration
            self.prepareStatus = prepareStatus
            self.totalDuration = totalDuration
            self.transferDuration = transferDuration
            self.transferStatus = transferStatus
            self.verifyDuration = verifyDuration
            self.verifyStatus = verifyStatus
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorDetail = "ErrorDetail"
            case prepareDuration = "PrepareDuration"
            case prepareStatus = "PrepareStatus"
            case totalDuration = "TotalDuration"
            case transferDuration = "TransferDuration"
            case transferStatus = "TransferStatus"
            case verifyDuration = "VerifyDuration"
            case verifyStatus = "VerifyStatus"
        }
    }

    public struct TaskFilter: AWSEncodableShape {
        /// The name of the filter being used. Each API call supports a list of filters that are available for it. For example, LocationId for ListTasks.
        public let name: TaskFilterName
        /// The operator that is used to compare filter values (for example, Equals or Contains). For more about API filtering operators, see query-resources.
        public let `operator`: Operator
        /// The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.
        public let values: [String]

        public init(name: TaskFilterName, operator: Operator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 255)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_\\ \\-\\:\\*\\.\\\\/\\?-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case `operator` = "Operator"
            case values = "Values"
        }
    }

    public struct TaskListEntry: AWSDecodableShape {
        /// The name of the task.
        public let name: String?
        /// The status of the task.
        public let status: TaskStatus?
        /// The Amazon Resource Name (ARN) of the task.
        public let taskArn: String?

        public init(name: String? = nil, status: TaskStatus? = nil, taskArn: String? = nil) {
            self.name = name
            self.status = status
            self.taskArn = taskArn
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case status = "Status"
            case taskArn = "TaskArn"
        }
    }

    public struct TaskSchedule: AWSEncodableShape & AWSDecodableShape {
        /// A cron expression that specifies when AWS DataSync initiates a scheduled transfer from a source to a destination location.
        public let scheduleExpression: String

        public init(scheduleExpression: String) {
            self.scheduleExpression = scheduleExpression
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, max: 256)
            try self.validate(self.scheduleExpression, name: "scheduleExpression", parent: name, pattern: "^[a-zA-Z0-9\\ \\_\\*\\?\\,\\|\\^\\-\\/\\#\\s\\(\\)\\+]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case scheduleExpression = "ScheduleExpression"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The keys in the key-value pair in the tag to remove.
        public let keys: [String]
        /// The Amazon Resource Name (ARN) of the resource to remove the tag from.
        public let resourceArn: String

        public init(keys: [String], resourceArn: String) {
            self.keys = keys
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.keys.forEach {
                try validate($0, name: "keys[]", parent: name, max: 256)
                try validate($0, name: "keys[]", parent: name, min: 1)
                try validate($0, name: "keys[]", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:/-]+$")
            }
            try self.validate(self.keys, name: "keys", parent: name, max: 50)
            try self.validate(self.keys, name: "keys", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 128)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:(agent|task|location)/(agent|task|loc)-[0-9a-z]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case keys = "Keys"
            case resourceArn = "ResourceArn"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAgentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the agent to update.
        public let agentArn: String
        /// The name that you want to use to configure the agent.
        public let name: String?

        public init(agentArn: String, name: String? = nil) {
            self.agentArn = agentArn
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.agentArn, name: "agentArn", parent: name, max: 128)
            try self.validate(self.agentArn, name: "agentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case agentArn = "AgentArn"
            case name = "Name"
        }
    }

    public struct UpdateAgentResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTaskExecutionRequest: AWSEncodableShape {
        public let options: Options
        /// The Amazon Resource Name (ARN) of the specific task execution that is being updated.
        public let taskExecutionArn: String

        public init(options: Options, taskExecutionArn: String) {
            self.options = options
            self.taskExecutionArn = taskExecutionArn
        }

        public func validate(name: String) throws {
            try self.options.validate(name: "\(name).options")
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, max: 128)
            try self.validate(self.taskExecutionArn, name: "taskExecutionArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case options = "Options"
            case taskExecutionArn = "TaskExecutionArn"
        }
    }

    public struct UpdateTaskExecutionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTaskRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource name of the CloudWatch LogGroup.
        public let cloudWatchLogGroupArn: String?
        /// A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: "/folder1|/folder2"
        public let excludes: [FilterRule]?
        /// The name of the task to update.
        public let name: String?
        public let options: Options?
        /// Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see task-scheduling.
        public let schedule: TaskSchedule?
        /// The Amazon Resource Name (ARN) of the resource name of the task to update.
        public let taskArn: String

        public init(cloudWatchLogGroupArn: String? = nil, excludes: [FilterRule]? = nil, name: String? = nil, options: Options? = nil, schedule: TaskSchedule? = nil, taskArn: String) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.excludes = excludes
            self.name = name
            self.options = options
            self.schedule = schedule
            self.taskArn = taskArn
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, max: 562)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\\-0-9]*:[0-9]{12}:log-group:([^:\\*]*)(:\\*)?$")
            try self.excludes?.forEach {
                try $0.validate(name: "\(name).excludes[]")
            }
            try self.validate(self.excludes, name: "excludes", parent: name, max: 1)
            try self.validate(self.excludes, name: "excludes", parent: name, min: 0)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9\\s+=._:@/-]+$")
            try self.options?.validate(name: "\(name).options")
            try self.schedule?.validate(name: "\(name).schedule")
            try self.validate(self.taskArn, name: "taskArn", parent: name, max: 128)
            try self.validate(self.taskArn, name: "taskArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case excludes = "Excludes"
            case name = "Name"
            case options = "Options"
            case schedule = "Schedule"
            case taskArn = "TaskArn"
        }
    }

    public struct UpdateTaskResponse: AWSDecodableShape {
        public init() {}
    }
}
